<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="source/admin/template/style/admin.css" rel="stylesheet" type="text/css" />
<script src="include/js/DatePicker/WdatePicker.js" type="text/javascript"></script>
</head>

<body>
<div class="maintop">当前位置：<?php echo $toptxt ?></div>
<?php if($d!=''){ ?>
<div class="main">
	<div class="info">
    <form action="<?php echo $Get_c; ?>&a=edit&run=1" method="post">
    <input name="cid" type="hidden" value="<?php echo $d['cid'] ?>" />
    <input name="aid" type="hidden" value="<?php echo $d['aid'] ?>" />
    <input name="molds" type="hidden" value="<?php echo $d['molds'] ?>" />
    <dl><dt>评论：</dt><dd><?php $aa=syDB($d['molds'])->find(array('id'=>$d['aid']),null,' id,title ');echo '['.moldsinfo($d['molds'],'moldname').']'.$aa['title']; ?></dd></dl>
    <dl><dt>用户：</dt><dd><input name="user" type="text" class="int" value="<?php echo $d['user']; ?>" /></dd></dl>
    <dl><dt>评论内容：</dt><dd><textarea name="body" style="width:500px; height:50px;" class="int"><?php echo $d['body'] ?></textarea></dd></dl>
    <dl><dt>评论时间：</dt><dd><input name="addtime" type="text" class="int" value="<?php echo date('Y-m-d H:i:s',$d['addtime']); ?>"  onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/></dd></dl>
    <dl><dt>管理回复：</dt><dd><textarea name="reply" style="width:500px; height:50px;" class="int"><?php echo $d['reply'] ?></textarea></dd></dl>
    <dl><dt>回复时间：</dt><dd><input name="retime" type="text" class="int" value="<?php if($d['rtime']==0){echo date('Y-m-d H:i:s',time());}else{echo date('Y-m-d H:i:s',$d['retime']);} ?>"  onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"/></dd></dl>
    <dl><dt>状态：</dt><dd><label><input name="isshow" type="radio" value="1" <?php if($d['isshow']==1)echo 'checked="checked"' ?> />已审</label> <label><input type="radio" name="isshow" value="0" <?php if($d['isshow']==0)echo 'checked="checked"' ?> />未审</label></dd></dl>
    <dl><dt>&nbsp;</dt><dd><input type="submit" value="提 交" class="btnbig" /> </dd></dl>
    </form>
    </div>
</div>
<?php }else{ ?>
<div class="main">
<?php if(count($lists)==0)echo '暂无评论'; ?>
<table width="100%" class="tablist">
<?php foreach($lists as $v){ ?>
  <tr class="trbg">
    <td width="130"><?php if($v['isshow']==0)echo '<span style="color:#C00">未审</span>&nbsp;&nbsp;' ?><a href="<?php echo $Get_c; ?>&a=edit&cid=<?php echo $v['cid']; ?>">编辑</a>&nbsp;&nbsp;<a href="<?php echo $Get_c; ?>&a=del&cid=<?php echo $v['cid']; ?>">删除</a></td>
    <td class="tdleft">&nbsp;&nbsp;评论：<?php $aa=syDB($v['molds'])->find(array('id'=>$v['aid']),null,' id,title ');echo '['.moldsinfo($v['molds'],'moldname').']'.$aa['title']; ?>
      [<?php echo $v['user']; ?>] 发表于<?php echo date('Y-m-d',$v['addtime']); ?>
      </td>
    </tr>
  <tr>
    <td colspan="2" style="line-height:22px;" class="tdleft">评论内容：<?php echo $v['body']; ?></td>
    </tr>
<?php } ?>
</table>
<ul class="pages"><?php echo $pages; ?></ul>
</div>
<?php } ?>
</body>
</html>
